Optimal. Leaf size=319 \[ \frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d}-\frac {b \text {Li}_2\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}+\frac {b \text {Li}_2\left (\frac {2}{1-c x}-1\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}-\frac {b \text {Li}_2\left (1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}+\frac {2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d}+\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{2 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-c x}\right )}{2 d}-\frac {b^2 \text {Li}_3\left (\frac {2}{1-c x}-1\right )}{2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{c x+1}\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.43, antiderivative size = 319, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5940, 5914, 6052, 5948, 6058, 6610, 5922} \[ \frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d}-\frac {b \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}+\frac {b \text {PolyLog}\left (2,\frac {2}{1-c x}-1\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}-\frac {b \text {PolyLog}\left (2,1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{2 d}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{2 d}-\frac {b^2 \text {PolyLog}\left (3,\frac {2}{1-c x}-1\right )}{2 d}-\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{c x+1}\right )}{2 d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d}+\frac {2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d}+\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5914
Rule 5922
Rule 5940
Rule 5948
Rule 6052
Rule 6058
Rule 6610
Rubi steps
\begin {align*} \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x (d+e x)} \, dx &=\int \left (\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2}{d (d+e x)}\right ) \, dx\\ &=\frac {\int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x} \, dx}{d}-\frac {e \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d+e x} \, dx}{d}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d}-\frac {(4 b c) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d}+\frac {(2 b c) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d}-\frac {(2 b c) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d}+\frac {\left (b^2 c\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d}-\frac {\left (b^2 c\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-c x}\right )}{2 d}-\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1-c x}\right )}{2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 12.61, size = 818, normalized size = 2.56 \[ \frac {24 c d \log (x) a^2-24 c d \log (d+e x) a^2-24 b \left (-\sqrt {1-\frac {c^2 d^2}{e^2}} e e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^2-c d \tanh ^{-1}(c x)^2+e \tanh ^{-1}(c x)^2+2 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x)-2 c d \log \left (1-e^{-2 \tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)+2 c d \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right ) \tanh ^{-1}(c x)+i c d \pi \tanh ^{-1}(c x)-i c d \pi \log \left (1+e^{2 \tanh ^{-1}(c x)}\right )+2 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-\frac {1}{2} i c d \pi \log \left (1-c^2 x^2\right )-2 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )+c d \text {Li}_2\left (e^{-2 \tanh ^{-1}(c x)}\right )-c d \text {Li}_2\left (e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right ) a+b^2 \left (16 \sqrt {1-\frac {c^2 d^2}{e^2}} e e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^3+16 c d \tanh ^{-1}(c x)^3-16 e \tanh ^{-1}(c x)^3+24 c d \log \left (1-e^{2 \tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)^2-24 c d \log \left (1-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)^2-24 c d \log \left (1+e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)^2-24 c d \log \left (e^{-\tanh ^{-1}(c x)} \left (e \left (-1+e^{2 \tanh ^{-1}(c x)}\right )+c d \left (1+e^{2 \tanh ^{-1}(c x)}\right )\right )\right ) \tanh ^{-1}(c x)^2+24 c d \log \left (\frac {c (d+e x)}{\sqrt {1-c^2 x^2}}\right ) \tanh ^{-1}(c x)^2+c d \log (16777216) \tanh ^{-1}(c x)^2+24 i c d \pi \log \left (e^{-\tanh ^{-1}(c x)}+e^{\tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)-48 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (\frac {1}{2} i e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )-\tanh ^{-1}(c x)} \left (-1+e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right ) \tanh ^{-1}(c x)+12 i c d \pi \log \left (1-c^2 x^2\right ) \tanh ^{-1}(c x)+48 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right ) \tanh ^{-1}(c x)+24 c d \text {Li}_2\left (e^{2 \tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)-48 c d \text {Li}_2\left (-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)-48 c d \text {Li}_2\left (e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right ) \tanh ^{-1}(c x)-24 i c d \pi \log (2) \tanh ^{-1}(c x)-12 c d \text {Li}_3\left (e^{2 \tanh ^{-1}(c x)}\right )+48 c d \text {Li}_3\left (-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+48 c d \text {Li}_3\left (e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+i c d \pi ^3\right )}{24 c d^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.67, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \operatorname {artanh}\left (c x\right )^{2} + 2 \, a b \operatorname {artanh}\left (c x\right ) + a^{2}}{e x^{2} + d x}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2}}{{\left (e x + d\right )} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.44, size = 1799, normalized size = 5.64 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -a^{2} {\left (\frac {\log \left (e x + d\right )}{d} - \frac {\log \relax (x)}{d}\right )} + \int \frac {b^{2} {\left (\log \left (c x + 1\right ) - \log \left (-c x + 1\right )\right )}^{2}}{4 \, {\left (e x^{2} + d x\right )}} + \frac {a b {\left (\log \left (c x + 1\right ) - \log \left (-c x + 1\right )\right )}}{e x^{2} + d x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2}{x\,\left (d+e\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \operatorname {atanh}{\left (c x \right )}\right )^{2}}{x \left (d + e x\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________